package com.sphd.restaurantsystem.presenter;


import com.android.volley.VolleyError;
import com.sphd.restaurantsystem.model.AddShareModelImpl;
import com.sphd.restaurantsystem.view.AddShareView;

/**
* Created by Hu on 2017/01/06
*/

public class AddSharePresenterImpl implements AddSharePresenter {
    private AddShareModelImpl addShareModel;
    private AddShareView addShareView;

    public AddSharePresenterImpl(AddShareView addShareView) {
        this.addShareView = addShareView;
        addShareModel=new AddShareModelImpl();
    }

    @Override
    public void addData(String url) {
        addShareView.showLoading();
        addShareModel.sendUrl(url,this);
    }

    @Override
    public void sendError(VolleyError error) {
        addShareView.dissLoading();
    }


    @Override
    public void recRes(int res) {
        addShareView.recRes(res);
        addShareView.dissLoading();
    }
}